


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="htmlId">
<head>
  <title>Coverage Report :: SUT</title>
  <style type="text/css">
    @import "../../.css/coverage.css";
  </style>
</head>

<body>
<div class="header"></div>

<div class="content">
<div class="breadCrumbs">
    [ <a href="../../index.html">all classes</a> ]
    [ <a href="../index.html">com.manning.junitbook.ch12.lifecycle</a> ]
</div>

<h1>Coverage Summary for Class: SUT (com.manning.junitbook.ch12.lifecycle)</h1>

<table class="coverageStats">
<tr>
  <th class="name">Class</th>
<th class="coverageStat 
">
  Class, %
</th>
<th class="coverageStat 
">
  Method, %
</th>
<th class="coverageStat 
">
  Line, %
</th>
</tr>
<tr>
  <td class="name">SUT</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (1/ 1)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    25%
  </span>
  <span class="absValue">
    (1/ 4)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    40%
  </span>
  <span class="absValue">
    (4/ 10)
  </span>
</td>
</tr>

</table>

<br/>
<br/>


<div class="sourceCode"><i>1</i>&nbsp;/*
<i>2</i>&nbsp; * ========================================================================
<i>3</i>&nbsp; *
<i>4</i>&nbsp; * Licensed to the Apache Software Foundation (ASF) under one or more
<i>5</i>&nbsp; * contributor license agreements.  See the NOTICE file distributed with
<i>6</i>&nbsp; * this work for additional information regarding copyright ownership.
<i>7</i>&nbsp; * The ASF licenses this file to You under the Apache License, Version 2.0
<i>8</i>&nbsp; * (the &quot;License&quot;); you may not use this file except in compliance with
<i>9</i>&nbsp; * the License.  You may obtain a copy of the License at
<i>10</i>&nbsp; *
<i>11</i>&nbsp; *   http://www.apache.org/licenses/LICENSE-2.0
<i>12</i>&nbsp; *
<i>13</i>&nbsp; * Unless required by applicable law or agreed to in writing, software
<i>14</i>&nbsp; * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
<i>15</i>&nbsp; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<i>16</i>&nbsp; * See the License for the specific language governing permissions and
<i>17</i>&nbsp; * limitations under the License.
<i>18</i>&nbsp; *
<i>19</i>&nbsp; * ========================================================================
<i>20</i>&nbsp; */
<i>21</i>&nbsp;
<i>22</i>&nbsp;package com.manning.junitbook.ch12.lifecycle;
<i>23</i>&nbsp;
<i>24</i>&nbsp;public class SUT {
<i>25</i>&nbsp;    private String systemName;
<i>26</i>&nbsp;
<b class="fc"><i>27</i>&nbsp;    public SUT(String systemName) {</b>
<b class="fc"><i>28</i>&nbsp;        this.systemName = systemName;</b>
<b class="fc"><i>29</i>&nbsp;        System.out.println(systemName + &quot; from class &quot; + getClass().getSimpleName() + &quot; is initializing.&quot;);</b>
<b class="fc"><i>30</i>&nbsp;    }</b>
<i>31</i>&nbsp;
<i>32</i>&nbsp;    public boolean canReceiveUsualWork() {
<b class="nc"><i>33</i>&nbsp;        System.out.println(systemName + &quot; from class &quot; + getClass().getSimpleName() + &quot; can receive usual work.&quot;);</b>
<b class="nc"><i>34</i>&nbsp;        return true;</b>
<i>35</i>&nbsp;    }
<i>36</i>&nbsp;
<i>37</i>&nbsp;    public boolean canReceiveAdditionalWork() {
<b class="nc"><i>38</i>&nbsp;        System.out.println(systemName + &quot; from class &quot; + getClass().getSimpleName() + &quot; cannot receive additional work.&quot;);</b>
<b class="nc"><i>39</i>&nbsp;        return false;</b>
<i>40</i>&nbsp;    }
<i>41</i>&nbsp;
<i>42</i>&nbsp;    public void close() {
<b class="nc"><i>43</i>&nbsp;        System.out.println(systemName + &quot; from class &quot; + getClass().getSimpleName() + &quot; is closing.&quot;);</b>
<b class="nc"><i>44</i>&nbsp;    }</b>
<i>45</i>&nbsp;
<i>46</i>&nbsp;
<i>47</i>&nbsp;}
</div>
</div>

<div class="footer">
    
    <div style="float:right;">generated on 2020-01-02 17:54</div>
</div>
</body>
</html>
